package com.ssfeng.youxia.controller;


import com.ssfeng.youxia.entity.EypArea;
import com.ssfeng.youxia.service.IEypAreaService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * <p>
 * 行政区域 前端控制器
 * </p>
 *
 * @author liyuhang
 * @since 2020-04-06
 */
@RestController
@RequestMapping("/eyp-area")
public class EypAreaController {

    private static final Logger logger = LoggerFactory.getLogger(EypAreaController.class);


    @Autowired
    private IEypAreaService eypAreaService;

    @GetMapping(value = "/findById")
    public EypArea findById(String id,@ModelAttribute("xxoo") EypArea eypArea){
       /* QueryWrapper<EypArea> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("area_id", id);
        EypArea eypArea = eypAreaService.getOne(queryWrapper);*/
        return eypArea;
    }


    @ModelAttribute
    public void beforeMethord(Map<String,Object> map){
        EypArea eypArea = new EypArea();
        eypArea.setName("天上人间");
        map.put("xxoo", eypArea);
    }

}
